package chatting4.Messages;

import java.io.Serializable;

public class Message<E> implements Serializable {

	private static final long serialVersionUID = 1456923489822008323L;
	private String userName;
	private String password;
	private String targetUserName;
	private int MsgType;
	private E content;
	
	public Message() {
		
	}
	
	public Message(String userName,String password,int MsgType) {
		this.userName = userName;
		this.password = password;
		this.MsgType = MsgType;
	}
	
	public Message(int MsgType,String userName,E content) {
		this.MsgType = MsgType;
		this.userName = userName;
		this.content = content;
	}
	
	public Message(int MsgType,String userName,E content,String targetUserName) {
		this.MsgType = MsgType;
		this.userName = userName;
		this.content = content;
		this.targetUserName = targetUserName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getMsgType() {
		return MsgType;
	}

	public void setMsgType(int msgType) {
		MsgType = msgType;
	}

	public E getContent() {
		return content;
	}

	public void setContent(E content) {
		this.content = content;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@Override
	public String toString() {
		return "Message [userName=" + userName + ", password=" + password + ", MsgType=" + MsgType + ", content="
				+ content + "]";
	}

	public String getTargetUserName() {
		return targetUserName;
	}

	public void setTargetUserName(String targetUserName) {
		this.targetUserName = targetUserName;
	}
	
	
}
